/*
 * Copyright 2017 Baiyyy
 * @(#)TSHumitureMapper.java
 */

package com.byyy.ccts.modules.ysjl.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.byyy.ccts.modules.ysjl.entity.YsjlActivity;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

/**
 * Created by DELL on 2018-5-7.
 */
public interface YsjlActivityMapper extends BaseMapper<YsjlActivity> {

    /** 自定义分页 */
    List<YsjlActivity> queryActivityListPage(Page<YsjlActivity> page, @Param("ew") Wrapper<YsjlActivity> wrapper);

    /** 自定义分页 */
    List<YsjlActivity> queryUserActivityListPage(Page<YsjlActivity> page, @Param("ew") Wrapper<YsjlActivity> wrapper, @Param("userId") String userId);

    /** 查询当前时间点后所有未完成活动列表 */
    List<YsjlActivity> queryList(String userId);

    /** 查询所有我参与的未完成活动列表 */
    List<YsjlActivity> queryMyActivityList(String userId);

    /** 查找今天结束的活动 */
    List<YsjlActivity> queryNotOverActivity();

    YsjlActivity querySameTimeActivity(@Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime, @Param("addressLat") float addressLat, @Param("addressLon") float addressLon);
}